<template>
  <view class="min-switch">
    <text class="text">{{desc}}</text>
    <switch
      :checked="value"
      @change="change"
      :disabled="disabled"
      :color="color"
      style="transform: scale(0.7,0.7)"
    />
  </view>
</template>

<script>
export default {
  name:"min-switch",
  props: {
    desc: {
      default: '123213'
    },
    value: {
      default: true
    },
    disabled: {
      default: false
    },
    color: {
      default: '#6CD56C'
    }
  },
  methods: {
    change (e) {
      // console.log(e.detail.value)
      this.$emit('change', e.detail.value)
      this.$emit('input', e.detail.value)
    }
  }
}
</script>

<style lang="scss" scoped>
.min-switch {
  height: 80rpx;
  font-size: 28rpx;
  margin: 0 20rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #F9F9F9;
  border-radius: 5rpx;
  .text{
  }
}
</style>
